package com.cq.hd.common.constant;

import java.math.BigDecimal;

/**
 * @description: 常量
 * @author: mYunYu
 * @date: 2021/7/7 15:57
 * @version: v1.0
 */
public class Constant {

    /**
     * 登录失效时间
     */
    public static final Long USER_LOGIN_TIMEOUT = 60 * 60 * 24 * 7L;

    /**
     * 一天秒数
     */
    public static final Long DAY_SECOND = 24 * 60 * 60L;

    /**
     * 点符号
     */
    public static final String DOT = ".";

    /**
     * 冒号
     */
    public static final String COLON = ":";

    /**
     * 杠号
     */
    public static final String BAR_SYMBOL = "-";

    /**
     * 默认页码
     */
    public static final int DEFAULT_PAGE_NUM = 1;


    /**
     * 默认每页显示条目数
     */
    public static final int DEFAULT_PAGE_SIZE = 10;

    public static final String YYYY_MM_DD = "yyyy-MM-dd";

    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

    public static final String YYYY_MM_DD_HH = "yyyy-MM-dd HH";

    public static final String YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm";

    public static final String DESC = "desc";

    public static final String ID_SPLIT = "__zs__";

    /**
     * 活动分享跳转小程序页面地址
     * pagesB/activity/activity?aId=ACTIVE_ID&code=CODE
     */
    public static final String ACTIVE_SHARE_URL_PAGE = "pagesB/activity/activity";

    /**
     * 拼团邀请页面
     */
    public static final String GROUP_SHARE_URL_PAGE = "pagesB/activity/activity-group-buy";

    /**
     * 邀请好友参团页面
     */
    public static final String GROUP_INVITE_URL_PAGE = "pagesA/order/group-buy-detail";

    /**
     * 邀请商家跳转小程序页面地址
     * pagesA/login/login?code=INVITE_URL_CODE&re=busi
     */
    public static final String INVITE_BUSINESS_URL_PAGE = "applyPages/inviteApply/inviteApply";

    /**
     * 邀请商户跳转小程序页面地址
     * pages/loginCode/login?code=BUSINESS_CODE&re=busi
     */
    public static final String INVITE_MERCHANT_URL_PAGE = "applyPages/bussinessApply/invitePage";

    /**
     * 邀请经纪人跳转小程序页面地址
     * applyPages/bindBusiness/bindBusiness?code=BUSINESS_CODE&groupId=GROUP_ID
     */
    public static final String INVITE_AGENT_URL_PAGE = "applyPages/bindBusiness/bindBusiness";

    /**
     * 分享商家主页跳转小程序页面地址
     * pagesA/merchant/homepage?code=BUSINESS_ID
     */
    public static final String BUSINESS_SHARE_URL_PAGE = "pagesA/merchant/homepage";

    /**
     * 分享商家主页跳转小程序页面地址
     * pagesF/merchantMall/index?id=BUSINESS_ID
     */
    public static final String BUSINESS_POINTS_MALL_SHARE_URL_PAGE = "pagesF/merchantMall/index";

    /**
     * 上传图片最大5M
     */
    public static final long MAX_FILE_SIZE = 5 * 1024 * 1024;

    /**
     * 上传视频最大10M
     */
    public static final long MAX_VIDEO_FILE_SIZE = 10 * 1024 * 1024;

    public static final String IMG_FILE_EXTENSIONS = "gif,jpg,jpeg,bmp,png,GIF,JPG,JPEG,BMP,PNG";

    public static final String VIDEO_FILE_EXTENSIONS = "mp3,mp4,avi,wmv,wav,MP3,MP4,AVI,WMV,WAV";

    /**
     * 多商户通用券商品图标
     */
    public static final String MUL_MERCHANT_GOODS_IMG_URL = "https://huodtg.oss-cn-hangzhou.aliyuncs.com/hd/dev/other/mul_merchant_goods_img.png";

    public static final String NO_LOGIN_USER_DEFAULT_AVATAR_URL = "https://huodtg.oss-cn-hangzhou.aliyuncs.com/hd/dev/other/mul_merchant_goods_img.png";

    public static final String LOGIN_USER_DEFAULT_AVATAR_URL = "https://huodtg.oss-cn-hangzhou.aliyuncs.com/hd/dev/other/mul_merchant_goods_img.png";

    /**
     * 商家角色id
     */
    public static final Integer BUSINESS_ROLE_ID = 26;

    /**
     * 商户/消费者自己升级为商家，赠送次数
     */
    public static final Integer GIVE_ACTIVE_COUNT = 2;

    public static final String LOCK_FORMAT = "lock:{0}";

    /**
     * 自动释放
     */
    public static final Long AUTO_UNLOCK_SECOND = 10L;

    /**
     * 订单待支付倒计时为15分钟
     */
    public final static Integer ORDER_DELAY_TIME = 15;

    /**
     * 网银支付服务费费率=2%
     */
    public final static BigDecimal BANK_PAY_FEE_AMT_RATE = new BigDecimal("0.02");

    /**
     * 网银支付发票税点费率=6%
     */
    public final static BigDecimal BANK_PAY_INVOICE_AMT_RATE = new BigDecimal("0.06");

    /**
     * 网银手续费=12元
     */
    public final static BigDecimal BANK_PAY_AMT = new BigDecimal("12");

    /**
     * 关注公众号扫码地址（永久二维码）
     */
    public final static String WX_PUB_SUBSCRIBE_CODE_URL = "https://huodtg.oss-cn-hangzhou.aliyuncs.com/hd/prd/user/20240226175633681.jpg";

    /**
     * 微信公众号通知json（退款成功通知）
     */
    public final static String WX_PUB_REFUND_NOTICE_JSON = "{\"amount5\":{\"value\":\"%s\"},\"character_string2\":{\"value\":\"%s\"},\"thing3\":{\"value\":\"%s\"},\"const9\":{\"value\":\"%s\"}}";

    /**
     * 微信公众号通知json（拼单失败提醒）
     */
    public final static String WX_PUB_ORDER_FAIL_NOTICE_JSON = "{\"amount4\":{\"value\":\"%s\"},\"character_string3\":{\"value\":\"%s\"},\"thing2\":{\"value\":\"%s\"},\"thing1\":{\"value\":\"%s\"}}";


    /**
     * 商户本金费率
     */
    public final static BigDecimal MERCHANT_AMT_RATE = new BigDecimal("0.005");

    /**
     * 经纪人费率
     */
    public final static BigDecimal AGENT_AMT_RATE = new BigDecimal("1.075");

    /**
     * 一个非常大的数
     */
    public final static Long VERY_BIG_NUMBER = 999999999999L;
}
